package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ConstantInfoRouter struct {
}

// InitConstantInfoRouter 初始化 ConstantInfo 路由信息
func (s *ConstantInfoRouter) InitConstantInfoRouter(Router *gin.RouterGroup) {
	constantInfoRouter := Router.Group("constantInfo").Use(middleware.OperationRecord())
	constantInfoRouterWithoutRecord := Router.Group("constantInfo")
	var constantInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.ConstantInfoApi
	{
		constantInfoRouter.POST("createConstantInfo", constantInfoApi.CreateConstantInfo)   // 新建ConstantInfo
		constantInfoRouter.DELETE("deleteConstantInfo", constantInfoApi.DeleteConstantInfo) // 删除ConstantInfo
		constantInfoRouter.DELETE("deleteConstantInfoByIds", constantInfoApi.DeleteConstantInfoByIds) // 批量删除ConstantInfo
		constantInfoRouter.PUT("updateConstantInfo", constantInfoApi.UpdateConstantInfo)    // 更新ConstantInfo
	}
	{
		constantInfoRouterWithoutRecord.GET("findConstantInfo", constantInfoApi.FindConstantInfo)        // 根据ID获取ConstantInfo
		constantInfoRouterWithoutRecord.GET("getConstantInfoList", constantInfoApi.GetConstantInfoList)  // 获取ConstantInfo列表
	}
}
